<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>大扎好，过河拆</title>
		<script>
			function add(a,b){
				return a+b;
			}
			const s1=add(4,7);
			alert(s1);
			const s2=add("hello","js");
			alert(s2);
			const s3=add("hello");//=>helloundefined
			alert(s3);
			const s4=add("hello","js","python");//=>hellojs
			alert(s4);
			const s5=add(["hello","js","python"],"yaoxi");//=>hellojs
			alert(s5);
			//清空之前的文档流
			function showJitang(){
				for (var i = 0; i < 10; i++) {
						document.write("<h1>好好学习，day day up</h1>");
				}
			}
		</script>
	</head>
	<body>
		<div >
			<button type="button" onclick="showJitang()">点击</button>
		</div>
	</body>
</html>